#pragma once

#include <list>
#include <string>
using namespace std;

enum AccountType { Regular_e, Family_e, Stock_e };

class AccountImpl;

class Bank_t {
public:
	static Bank_t& getBank() { return sngBank; } 

	virtual void Attach(AccountImpl* acc);
	virtual void Detach(AccountImpl* acc);
	virtual void Notify3YearAccounts();
	virtual void NotifyFamilyAccounts();
	virtual void NotifyStockAccounts();

private:
	static Bank_t sngBank;

	int m_curYear;

	// We have chosen list as the STL container, because it has fast add/remove comparing to vector, 
	// and also we don't need direct access (as we always iterate over the entire list)
 	list<AccountImpl*> m_observers; 

	Bank_t(int year){ m_curYear = year; } //CTOR
	Bank_t(const Bank_t&); //Copy CTOR
	void operator=(Bank_t&); //Assignment operator
};
